using System;
using System.Collections.Generic;
using System.Text;

namespace ca.metaobjects.csogateway
{
	/// <summary>
	/// <para>
	/// Specifies that the property this attribute is attached to should be ignored by the CSO Gateway.
	/// </para>
	/// <para>
	/// This attribute can be attached to properties of classes and structs. The CSO Gateway ignores all non-public properties and all properties with no get accessor.
	/// In these cases the CsoPropertyExcludeAttribute has no effect.
	/// 
	/// The case of properties in structs is pretty straightforward because there is no inheritance: the property will be completely ignored by the CSO Gateway.
	/// 
	/// For classes, the effect of this attribute is inherited by the declarations of the same property in derived classes unless a derived class is decorated
	/// with the CsoGeneratedTypeAttribute (a cso-ready class) and has CsoGeneratedTypeAttribute.IgnoreBaseClass set to true. In that case, if that derived class or
	/// one of its derived classes declares the property again (by overriding or hiding it) the CSO Gateway will take it into account.
	/// </para>
	/// 
	/// <para>
	/// This attribute has different effects on a virtual/override inheritance chain of properties then on a non-virtual/new inheritance chain of property.
	/// 
	/// When the attribute is attached to the base declaration of an inheritance chain of virtual/overrides properties (the one with the virtual modifier),
	/// all the other declarations in derived classes will also be ignored whether of not the class of the base declaration is cso-ready.
	/// 
	/// When the attribute is attached to an overriding declaration of the property (the ones with the 'override' modifier), the attribute has -no effect-.
	/// </para>
	/// 
	/// <para>
	/// When the attribute is attached to the base declaration of an inheritance chain of non-virtual/new properties (a method with no inheritance modifier),
	/// all the other declarations in the derived classes will also be ignored whether of not the class of the base declaration is cso-ready and EVEN
	/// if a property hides its base declaration with the new modifier.
	/// 
	/// When the attribute is attached to an hiding declaration of the property (with the 'new' modifier), that property will still be defined in the
	/// cso-generated type corresponding to the declaring class of the property. But the value retreived by the Object Gateway will be
	/// the value returned by the version of the property that is the closest up in the inheritance chain.
	/// </para>
	/// 
	/// <para>
	/// To sum up, the effect of the CsoPropertyExcludeAttribute on a property (disregarding the possibility of
	/// a CsoGeneratedTypeAttribute.IgnoreBaseClass set to true):
	/// 
	/// <table>
	///		<tr><th>Modifier</th><th>Effect</th></tr>
	///		<tr><td>virtual</td>					<td>The property and all overriding declaration of that same property in derived classes are ignored. The property won't exist for any cso-type.</td></tr>
	///		<tr><td>override</td>					<td>No effect.</td></tr>
	///		<tr><td>-no inheritance modifier-</td>	<td>The property and all the hiding declarations of that same property in derived classes are ignored. The property won't exist for any cso-type.</td></tr>
	/// 	<tr><td>new</td>						<td>The property and all the hiding declarations of that same property in derived classes are ignored. But since the property is still declared in an ancestor class, the property will still be defined for the cso-generated type. The value retreived by the Object Gateway and passed to the constructor control will be from the declaration of the property that is closest up in the inheritance chain.</td></tr>
	/// </table>
	/// </para>
	/// </summary>
	/// 
	[AttributeUsage(AttributeTargets.Property, AllowMultiple=false, Inherited=true)]
	public class CsoPropertyExcludeAttribute : System.Attribute
	{
		/// <summary>
		/// Create a new instance of CsoPropertyExcludeAttribute.
		/// </summary>
		public CsoPropertyExcludeAttribute()
		{ }
	}
}